/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package frm.billingAndPaymentProcessing.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;

/**
 *
 * @author xhx
 */
@Entity
public class DunningEmailEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private int dunningLevel;
    private boolean isReplied;
    private String contetnt;
    private Long commencedBy;
    
    @ManyToOne(targetEntity=InvoiceEntity.class)
    private InvoiceEntity invoice;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date sendDate;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dueDate;
   
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DunningEmailEntity)) {
            return false;
        }
        DunningEmailEntity other = (DunningEmailEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "finance.billingAndPayment.entity.DunningEmail[ id=" + id + " ]";
    }

    public int getDunningLevel() {
        return dunningLevel;
    }

    public void setDunningLevel(int dunningLevel) {
        this.dunningLevel = dunningLevel;
    }

    public boolean isIsReplied() {
        return isReplied;
    }

    public void setIsReplied(boolean isReplied) {
        this.isReplied = isReplied;
    }

    public Long getCommencedBy() {
        return commencedBy;
    }

    public void setCommencedBy(Long commencedBy) {
        this.commencedBy = commencedBy;
    }

    public InvoiceEntity getInvoice() {
        return invoice;
    }

    public void setInvoice(InvoiceEntity invoice) {
        this.invoice = invoice;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public String getContetnt() {
        return contetnt;
    }

    public void setContetnt(String contetnt) {
        this.contetnt = contetnt;
    }
    
}
